package com.igeek.dao;

import com.igeek.entity.Product;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductDao {
    /**
     * 查看所有商品
     * @return
     */
    public List<Product>  findAll();

    /**
     * 根据Id查找商品
     * @return
     */
    public Product findById(Integer proId);

    /**
     *
     * @param typeId
     * @return
     */
    public List<Product> findByTypeId(Integer typeId);

    public List<Product> findByOption(@Param("brand") String brand, @Param("location") String location);
}
